filetype plugin on
filetype indent on
"let Tlist_Use_SingleClick = 1
let Tlist_Ctags_Cmd = 'ctags'
set smartindent
let g:use_zen_complete_tag = 1
"let Tlist_Auto_Open = 1
"Key mapping
" Pull word under cursor into LHS of a substitute
nmap <leader>z :%s#\<<c-r>=expand("<cword>")<cr>\>#
" Pull Visually Highlighted text into LHS of a substitute
""vmap <leader>z :<c-u>%s/\<<c-r>*\>/       ----works in Linux
"'<,'>
" Quick jumping between splits
map <C-J> <C-W>j
map <C-K> <C-W>k
map <C-l> <C-W>l
map <C-h> <C-W>h
map <c-s> :update <CR>
let g:user_zen_expandabbr_key = '<c-e>'
map <F7> :!ctags -R<CR>
"map <F7> :!ctags -R --c-kinds=+p --fields=+S<CR>
let g:snippetsEmu_key = "<c-space>"
nnoremap <silent> <F8> :TlistToggle<CR>
"Key Mapping End
"UI settings
colorscheme evening
syntax on
set mouse =n
set number
set hls is
set completeopt=menuone,preview
set laststatus=2
set guifont=Consolas:h10:cANSI     
set fileencodings=utf-8,gb2312
set fileencoding=utf-8
set backspace=eol,start,indent
set wildmenu
set ignorecase
set nocp
"UI settings end
"tab settings
let g:miniBufExplMapWindowNavVim = 1
let g:miniBufExplMapWindowNavArrows = 1
let g:miniBufExplMapCTabSwitchBufs = 1
let g:miniBufExplModSelTarget = 1 
let g:Tb_SplitToEdge = 1
let g:Tb_UseSingleClick=1
"tab settings end
"python format
func! Python_run()
	exec "w"
	exec "!%"
endfunc
function! MakePython()
	execute "silent make %"
	execute "normal :"
	execute "copen"
endfunction
let g:pydiction_location = '$VIM\vimfiles\ftplugin\python\complete-dict'
let g:pydoc_cmd = "d:\\Python27\\Lib\\pydoc.py" 
set autoindent
autocmd Filetype python set makeprg=c:\Python31\python.exe
autocmd FileType python set tabstop=4 expandtab shiftwidth=4 softtabstop=4
autocmd FileType python map <F5> :make<CR>
autocmd FileType python map <F6> :call Python_run()<CR>
autocmd Filetype python set efm=%C\ %.%#,%A\ \ File\ \"%f\"\\,\ line\ %l%.%#,%Z%[%^\ ]%\\@=%m 
autocmd FileType python map <F4> :call MakePython()<CR>
"autocmd Filetype python set errorformat=\ \ File\ \"%f\",\ line\ %l
"autocmd FileType python set smartindent cinwords=if,elif,else,for,while,with,try,except,finally,def,class
"autocmd BufRead *.py set makeprg=python\ -c\ \"import\ py_compile,sys;\ sys.stderr=sys.stdout;\ py_compile.compile(r'%')\"
"python format end
"php
"setlocal shellpipe=>
autocmd Filetype php set makeprg=\"php\"\ -l\ -n\ -d\ html_errors=off
autocmd Filetype php set errorformat=%m\ in\ %f\ on\ line\ %l
autocmd Filetype inc set ft=php
